import React, { useState } from 'react';
import { Select, Button, Row, Col, DatePicker, Modal } from 'antd';
const { Option } = Select;

const { RangePicker } = DatePicker;

const PriceInput = ({ value = {}, onChange }) => {
    const [number, setNumber] = useState(0);
    const [currency, setCurrency] = useState('rmb');
    const [tagType, setTagType] = useState(1);
    const [isModalVisible, setIsModalVisible] = useState(false);


    const triggerChange = (changedValue) => {
        onChange?.({
            number,
            currency,
            ...value,
            ...changedValue,
        });
    };

    const showModal = () => {
        setIsModalVisible(true);
    };

    const handleOk = () => {
        setIsModalVisible(false);
    };

    const handleCancel = () => {
        setIsModalVisible(false);
    };

    return (
        <span>
            <Row gutter={[16, 10]}>
                <Col span={24}>
                    <Button type="primary" onClick={showModal}>
                        选择用户
                    </Button>
                    <Modal title="Basic Modal" visible={isModalVisible} onOk={handleOk} onCancel={handleCancel}>
                        <p>Some contents...</p>
                        <p>Some contents...</p>
                        <p>Some contents...</p>
                    </Modal>
                </Col>
                <Col>
                    <div style={{fontSize: 12,color: '#bfbfbf'}}>
                    已被打上标签的用户，被剔除掉，则不再属于该标签用户，此后也将不自动打上此标签；
                    <br />
                    未被打上标签的用户，被剔除掉，则当条件满足时，也不会被自动打上此标签； 
                    </div>
                </Col>
            </Row>
        </span>
    );
};

export default PriceInput;